import { requestClient } from '#/api/request';

export namespace MapApi {
  export interface addedData {
    mapId: string;
    fileId: string;
    type: string;
  }
}

const getMapList = (
  userId: string,
  pageSize: number,
  currentPage: number,
  keyword: string,
) =>
  requestClient.get(
    `dsc-systemMS/dsc-map/getList/${userId}/${pageSize}/${currentPage}?keyword=${keyword}`,
  );

const deleteMap = (userId: string, mapId: string) =>
  requestClient.delete(`/dsc-systemMS/dsc-map/delete/${userId}/${mapId}`);

const getMapUrl = (id: string) => {
  return requestClient.get(`dsc-systemMS/dsc-map/getMapUrl/${id}`);
};

export default {
  getMapList,
  deleteMap,
  getMapUrl,
};
